package com.njuse.jvmfinal.Instruction;

import java.nio.ByteBuffer;

import com.njuse.jvmfinal.runtimestructure.Jframe;

public class INEG extends Instruction {
	   
		public  void readindex(ByteBuffer reader) {
			
		}
		
		public  void execute(Jframe frame) {
			int top=frame.getStacktop();
			Object[] stack=frame.getManagestack();
			int temp=(int) stack[top-1];
			top--;
			int number=-temp;
			stack[top]=number;
			top++;
			frame.setManagestack(stack);
			frame.setStacktop(top);
		}
}
